package com.nstar.orderexpress.view
{
	import mx.core.Application;
	import mx.events.FlexEvent;
	import com.nstar.orderexpress.model.Model;
	import com.nstar.base.util.Logger;
	import com.nstar.orderexpress.mxml.WelcomeView;
	import mx.containers.ViewStack;
	import com.nstar.orderexpress.mxml.MainView;
	import com.nstar.orderexpress.mxml.InfoPanelView;
	import mx.controls.Image;
	import com.nstar.base.util.EffectUtils;
	import mx.controls.Button;
	import flash.events.MouseEvent;
	import com.adobe.cairngorm.control.CairngormEventDispatcher;
	import com.nstar.orderexpress.control.QueryEvent;
	import com.nstar.orderexpress.vo.QueryVO;
	


	public class OrderExpressApp extends Application
	{
		private var model:Model = Model.getInstance();
		public var logger:Logger = Logger.getInstance();
		
		public var welcomeView:WelcomeView;
		public var vsMain:ViewStack;
		public var mainView:MainView;
		public var infoPanelView:InfoPanelView;
		public var imgQuick:Image;
		public var btntest:Button;
		
		public function OrderExpressApp()
		{
			//TODO: implement function
			this.addEventListener(FlexEvent.CREATION_COMPLETE,init);
			super();
		}
		

		
		private function init(event:FlexEvent):void{
			model.mainApp = this;
			//EffectUtils.setFlowEffect(imgQuick);
			//注册映射类
			VoRegister.register();
			
			//btntest.addEventListener(MouseEvent.CLICK,testHandler);
		}
		
		private function testHandler(event:MouseEvent):void{
			var query:QueryEvent = new QueryEvent(new QueryVO());
			CairngormEventDispatcher.getInstance().dispatchEvent(query);
		}
		
		
	}
}